let person ={
    name:'zyx',
    age:18,
    like:{
        n:'running'
    }
}



function shallow(obj){
    let res = {}
    for(let key in obj){
        //key是不是obj显示具有的属性
        if(obj.hasOwnProperty(key)){
            res[key] = obj[key]
        }
       
    }

    return res
}
console.log(shallow(person));
